package com.ty.tour.controller;


import com.ty.tour.common.utils.ReturnData;
import com.ty.tour.pojo.Custom;
import com.ty.tour.service.CustomService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/***
 * @MethodName: 定制类型Controller控制器
 * @Author: xiexiaoping
 * @Date: 2020/3/19 16:37
 **/
@Api(value = "定制类型Controller",tags = "定制类型查看")
@RestController
@RequestMapping("/custom")
public class CustomController {
    @Autowired
    private CustomService customService;

    /***
     * @MethodName: list
     * @Description: 定制类型列表
     * @Param: []
     * @Return: com.ty.tour.common.utils.ReturnData
     * @Author: xiexiaoping
     * @Date: 2020/3/19 16:44
     **/
    @PostMapping("/list")
    @ApiOperation(value = "定制类型列表",notes = "定制类型实体")
    public ReturnData list(){
        final ReturnData returnData = new ReturnData();
        return returnData.success(customService.list(),1);
    }
}
